home *** CD-ROM | disk | FTP | other *** search
- // INT_68hDlg.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "INT_68h.h"
- #include "INT_68hDlg.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CINT_68hDlg dialog
-
- CINT_68hDlg::CINT_68hDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CINT_68hDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CINT_68hDlg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
- m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
- }
-
- void CINT_68hDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CINT_68hDlg)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
-
- BEGIN_MESSAGE_MAP(CINT_68hDlg, CDialog)
- //{{AFX_MSG_MAP(CINT_68hDlg)
- ON_WM_PAINT()
- ON_WM_QUERYDRAGICON()
- ON_BN_CLICKED(IDC_OK, OnOk)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CINT_68hDlg message handlers
-
- BOOL CINT_68hDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // Set the icon for this dialog. The framework does this automatically
- // when the application's main window is not a dialog
- SetIcon(m_hIcon, TRUE); // Set big icon
- SetIcon(m_hIcon, FALSE); // Set small icon
-
- // TODO: Add extra initialization here
-
- return TRUE; // return TRUE unless you set the focus to a control
- }
-
- // If you add a minimize button to your dialog, you will need the code below
- // to draw the icon. For MFC applications using the document/view model,
- // this is automatically done for you by the framework.
-
- void CINT_68hDlg::OnPaint()
- {
- if (IsIconic())
- {
- CPaintDC dc(this); // device context for painting
-
- SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
-
- // Center icon in client rectangle
- int cxIcon = GetSystemMetrics(SM_CXICON);
- int cyIcon = GetSystemMetrics(SM_CYICON);
- CRect rect;
- GetClientRect(&rect);
- int x = (rect.Width() - cxIcon + 1) / 2;
- int y = (rect.Height() - cyIcon + 1) / 2;
-
- // Draw the icon
- dc.DrawIcon(x, y, m_hIcon);
- }
- else
- {
- CDialog::OnPaint();
- }
- }
-
- // The system calls this to obtain the cursor to display while the user drags
- // the minimized window.
- HCURSOR CINT_68hDlg::OnQueryDragIcon()
- {
- return (HCURSOR) m_hIcon;
- }
-
- void CINT_68hDlg::OnOk()
- {
- __asm
- {
- mov ax,ds
- test al,4 // o jak² operaΦnφ systΘm se jednß?
- je Not_Win9x // skok = operaΦnφm systΘmem je Windows 9x/Me
-
- mov ah,43h // AH = Φφslo obsluhy
- INT 68h
- cmp ax,0F386h // pokud je nßvratovß hodnota dalÜφ "magickΘ"
- // Φφslo F386h, pak je SoftICE aktivnφ
- jz SoftICE
- }
- MessageBox("SoftICE nenalezen",NULL,MB_OK);
- return;
-
- SoftICE:
- MessageBox("SoftICE nalezen",NULL,MB_OK);
- return;
-
- Not_Win9x:
- MessageBox("Tato metoda funguje pouze ve Windows 9x/Me",NULL,MB_OK);
- }
-